package com.hpin.fansea.service;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.hpin.fansea.R;
import com.hpin.fansea.base.BaseActivity;
import com.hpin.fansea.utils.Constant;

/**
 *
 * 服务价目表页面
 * Created by Aaron on 15/10/31.
 */
public class PriceListHtActivity extends BaseActivity {

    private WebView wb_price;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_service_price);

        mApplication.addActivity(this);

        initWidget();

        String style = getIntent().getStringExtra("style");

        switch (style) {

            case Constant.FW_JZ://家政

                wb_price.loadUrl(Constant.FW_JZ_PRICE);

                break;
            case Constant.FW_XC://洗车

                break;
            case Constant.FW_XY://洗衣

                wb_price.loadUrl(Constant.FW_XY_PRICE);

                break;
            case Constant.FW_PS://配送

                break;

        }


    }

    private void initWidget() {

        ImageView iv_left = (ImageView) findViewById(R.id.iv_left);
        TextView tv_title = (TextView) findViewById(R.id.tv_title);

        tv_title.setText(getResources().getString(R.string.price_list));

        wb_price = (WebView) findViewById(R.id.wb_price);

        iv_left.setOnClickListener(this);
    }

    @Override
    public void widgetClick(View v) {

        switch (v.getId()) {
            case R.id.iv_left:	//返回
                finish();
                break;

            default:
                break;
        }
    }
}
